{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 二、系统\n",
    "\n",
    "1. 系统的描述\n",
    "1. 系统的性质\n",
    "    1. 线性\n",
    "    1. 时不变性\n",
    "    1. 因果性\n",
    "    1. 稳定性"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2. 系统的性质\n",
    "\n",
    "#### 2.1 线性\n",
    "\n",
    "等同于代数中的线性——齐次性与可加性（一般不用这个性质做判别）。\n",
    "\n",
    "假若某动态线性系统对应一个**线性变换 $T[\\{状态\\}，\\{输入\\}]$**，则该系统满足如下几个性质：\n",
    "\n",
    "1. **分解性**：$y(t)=y_{zi}(t) + y_{zs}(t)$\n",
    "\n",
    "    **完全响应 $y(t)$ 可分解为零输入（zero input）响应和零状态（zero state）响应**\n",
    "\n",
    "1. **零状态线性**：$T[\\{0\\}, \\{af_1(t)+bf_2(t)\\}] = aT[\\{0\\}, \\{f_1(.)\\}] + bT[\\{0\\}, \\{f_2(.)\\}]$\n",
    "\n",
    "    即状态为 0 时，系统的输入 $f_i(t)$ 的线性组合等同于对应的响应 $T[\\{0\\}, \\{f_i(.)\\}]$ 的线性组合。\n",
    "\n",
    "1. **零输入线性**：$T[\\{ax_1(0)+bx_2(0)\\}, \\{0\\}] = aT[\\{x_1(0)\\}, \\{0\\}] + bT[\\{x_2(0)\\}, \\{0\\}]$\n",
    "\n",
    "    即输入为 0 时，系统的零状态 $x_i(0)$ 也能做线性组合。\n",
    "    \n",
    "举例：\n",
    "\n",
    "1. $y(t) = 3x(0) + 2f(t) - x(0)f(t) + 1$\n",
    "\n",
    "    - 令输入 $f(t) = 0$，得 $y_{zi} = 3x(0)$. 常数部分属于状态，忽略掉。\n",
    "    - 令状态 $x(0) = 0$，得 $y_{zs} = 2f(t) + 1$\n",
    "    - 因为有 $- x(0)f(t)$ 的存在，**不满足分解性，是非线性系统**。\n",
    "1. $y(t) = 5x(0) - \\int_{-\\infty}^tf(x)\\ dx$\n",
    "    - 令输入 $f(t) = 0$，得 $y_{zi} = 5x(0)$.\n",
    "    - 令状态 $x(0) = 0$，得 $y_{zs} = - \\int_{-\\infty}^tf(x)\\ dx$\n",
    "    - $y(t)=y_{zi}(t) + y_{zs}(t)$, 满足分解性\n",
    "    - 令状态 $x(0) = 0$，输入 $f(t) = af_1(t) + bf_2(t)$，满足**零状态线性**\n",
    "    - 令输入 $f(t) = 0$，状态 $x(0) = ax_1(t) + bx_2(t)$，满足**零输入线性**\n",
    "    - 所以**是线性系统**\n",
    "1. $y(t) = x(0)e^{-2t} + f^2(t)$\n",
    "    - 方法同上，此系统满足分解性、零输入线性，但是不满足零状态线性（输入 $f(t)\\ \\text{成了平方项}$），是非线性系统"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.2 时不变性\n",
    "\n",
    "时不变性指系统的特性和行为不随时间变化，或者说与时间无关。\n",
    "\n",
    "验证：若系统的输入 $f(t)$ 延迟 $t_0$，它对应的零状态响应 $y_{zs}(t)$ 也会延迟 $t_0$. \n",
    "\n",
    "$$f(t) \\to y_{zs}(t) \\\\\n",
    "f(t-t_0) \\to y_{zs}(t-t_0)$$\n",
    "\n",
    "举例：\n",
    "\n",
    "1. $y_{zs}(t) = tf(t)$\n",
    "\n",
    "    $y_{zs}(t)$ 时延 $t_0$ 得：$y_{zs}(t-t_0) = (t-t_0)f(t-t_0)$\n",
    "    \n",
    "    $f(t)$ 时延 $t_0$ 后的零状态响应为：$T[\\{0\\}, \\{f(t-t_0)\\}] = tf(t-t_0)$. 注意只延时了输入 $f(t)$，因此 $tf(t)$ 也只需要改变$f(t)$.\n",
    "    \n",
    "    $y_{zs}(t) \\ne T[\\{0\\}, \\{f(t-t_0)\\}]$，是时变系统\n",
    "    \n",
    "1. $y_{zs}(t) = f(t)f(t-1)$\n",
    "\n",
    "    $y_{zs}(t)$ 时延 $t_0$ 得：$y_{zs}(t-t_0) = f(t-t_0)f[(t-t_0)-1]$\n",
    "    \n",
    "    $f(t)$ 时延 $t_0$ 后的零状态响应为：$T[\\{0\\}, \\{f(t-t_0)\\}] = f(t-t_0)f[(t-t_0)-1]$. \n",
    "    \n",
    "    $y_{zs}(t) = T[\\{0\\}, \\{f(t-t_0)\\}]$，是时不变系统\n",
    "\n",
    "1. $y_{zs}(t) = f(2t)$，响应是输入在时间上的压缩\n",
    "\n",
    "    $y_{zs}(t)$ 时延 $t_0$ 得：$y_{zs}(t-t_0) = f[2(t-t_0)]$\n",
    "    \n",
    "    $f(t)$ 时延 $t_0$ 后的零状态响应为：令 $g(t) = f(t-t_0)$, 有 $T[\\{0\\}, \\{f(t-t_0)\\}] = T[\\{0\\}, \\{g(t)\\}] = g(2t) = f(2t-t_0)$. 通过换元可以观察到只有 $t$ 本身被压缩了，$t_0$ 可没被压缩。\n",
    "    \n",
    "    $y_{zs}(t) \\ne T[\\{0\\}, \\{f(t-t_0)\\}]$，是时变系统\n",
    "    \n",
    "#### 直观的判断方法\n",
    "\n",
    "**只要输入 $f(.)$ 在变换中发生了展缩[$f(2t)$]、反转[$f(-t)$]，或者出现了变系数[$tf(t)$]，则该系统为时变系统。**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.3 因果性\n",
    "\n",
    "因果系统指零状态响应不会出现在激励之前的系统，该系统的输出只取决于当前的输入及当前系统的状态。\n",
    "\n",
    "#### 因果信号\n",
    "\n",
    "借助“因果”这一关系，我们称在 $t=0$ 之后才对系统产生影响的信号为因果信号。换句话说，t<0时，信号取值为0的信号为因果信号。\n",
    "\n",
    "因果信号的性质：\n",
    "\n",
    "1. 若 $f(t)$ 为因果信号，有 $f(t) = f(t) u(t)$\n",
    "1. 以因果信号 $f(t)$ 作为因果系统的输入，其零状态响应 $y(t)$ 也是因果信号。即 $y_{zs}(t) = y_{zs}(t)u(t)$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 其他性质\n",
    "\n",
    "1. 稳定性：若稳定系统的输入有界，其输出也一定有界。\n",
    "1. 可逆性\n",
    "1. 记忆性"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. LTI 系统的特征函数（对比线性代数中的特征向量）\n",
    "\n",
    "若信号 $x(t)$ 输入 LTI 系统得到的输出（即积分微分变换）仍具有原来的形式，则称 $x(t)$ 为 LTI 系统的特征函数。\n",
    "典型的特征函数有：指数函数和三角函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.6.3",
   "language": "julia",
   "name": "julia-1.6"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "julia",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
